﻿using System;
using System.Collections.Generic;

using SharedGenomics.Domain;
using SharedGenomics.DataTransfer;
using SharedGenomics.Workbench.Core;
using SharedGenomics.Workbench.Aspects;

namespace SharedGenomics.Workbench.Services
{
    public interface IDataService
    {
        [LoginRequired]
        Maybe<string[]> GetUnavailbleMarkers(string[] markerNames);

        [LoginRequired]
        Maybe<Map> AddGroupMarkerByRsNumber(string markerName, long rsNumber);

        [LoginRequired]
        void AddGroupMarkerBySnpDetails(string markerName, short chromosome, long position);

        [LoginRequired]
        Maybe<EntityInfo[]> GetUserFileSchemaInfos();

        [LoginRequired]
        Maybe<FileSchema> GetSchema(int fileSchemaId);

        [LoginRequired]
        void AddSchema(FileSchema schema);

        [LoginRequired]
        Maybe<EntityInfo[]> GetUserFileSetInfos();

        [LoginRequired]
        Maybe<FileSetUploadInfo> CreateFileSet(string fileSetName, int fileSchemaId, SharedGenomics.DataAccess.GenotypeDataFileFormat genotypeFileFormat);

        [LoginRequired]
        void CreateDataSet(DataSetInfo dataSetInfo);

        [LoginRequired]
        Maybe<EntityInfo[]> GetUserDataSetInfos();

        [LoginRequired]
        Maybe<DataSetSummary[]> GetUserDataSetSummaries();

        [LoginRequired]
        Maybe<JobDetails[]> GetUserJobs(JobSpecification specification, int[] idsToIgnore);

        [LoginRequired]
        Maybe<bool> IsUserRegisteredForSharedGenomics();

        [LoginRequired]
        Maybe<JobResultsFileLocationInfo> GetJobResultsFileLocation(int jobId);

        [LoginRequired]
        Maybe<FileSetDataDistributionSummary> GetFileSetDataDistribution(int fileSetId);
    }
}
